package com.zjk.user.controller;

import com.zjk.pojo.dto.UserDTO;
import com.zjk.result.ResultResponse;
import com.zjk.user.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: gfk
 * @create: 2022/10/31
 * @Description:
 * @FileName: UserController
 * @History:
 * @自定义内容：
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    UserService userService;


    @PostMapping("/login")
    public ResultResponse login(@RequestBody UserDTO userDTO){
        ResultResponse login = userService.login(userDTO);
        return login;
    }
}
